Music Object Version 3.0.0
RELEASE DATE: 1999-02-10

What's New In This Version

In the interest of developing the Music Object API into a robust API for Web page sonification, and also a possible candidate for standardization as a module for the ECMA-262 scripting language, Beatnik Inc. has made some noteworthy changes to the API. These changes may require that some of your sonified content be updated in order to use the 3.0.x version of Music Object.

A Change in Name : "musicObject" Becomes "Music"

The object name "musicObject" has been changed to just "Music".

To recap, the change in the object constructor name is primarily to make the Music Object API look similar to, and fit in well with the other objects that are already built into the JavaScript language.

Static Methods

With Music Object 3.0, it is now possible to call global utility methods by directly dereferencing the Music Object constructor. All global functions of the Music Object API that were prefixed with "mo_" are now referenced as methods of "Music". So, for example, the global Music Object API function "mo_isPlayerCompatible" is now called as "Music.isPlayerCompatible".

While the definition in some programming languages of a "static method" means that it may be called as a method of any instance of the object class, this is not the case with JavaScript. Static methods, as implemented in the Music Object API, can only be called as methods of the "Music" object constructor and not instances of the "Music" object that have been created.

The table below lists the old global Music Object API functions and their new names as static methods of "Music".

Global Function Static&Method Name Backward Compatible
mo_magicEmbed Music.magicEmbed yes (deprecated)
mo_installBeatnik Music.installPlayer yes (deprecated)
mo_isPlayerCompatible Music.isPlayerCompatible yes (deprecated)
mo_hasMinVersion Music.hasMinVersion yes (deprecated)
mo_promptClose Music.promptClose yes (deprecated)
mo_promptUser Music.promptUser yes (deprecated)
mo_getNoteName Music.getNoteName yes (deprecated)
mo_getNoteNumber Music.getNoteNumber yes (deprecated)

NOTE  The highlighted static method names indicate names that differ significantly from their original forms.
Static Properties

In a similar vein to the new static methods, all properties of the Music Object API that were available as global variables prefixed with "mo_" are now dereferenced as static properties of the "Music" object constructor. So, for example, the global Music Object API property "mo_debugToStatus" is now used in the form "Music.debugToStatus".

While the definition in some programming languages of a "static property" means that it may be referenced as a property of any instance of the object class, this is not the case with JavaScript. Static properties, as implemented in the Music Object API, can only be referenced as properties of the "Music" object constructor and not from instances of the "Music" object that have been created.

The table below lists the old global Music Object API properties and their new names as static properties of "Music".

Global Property Static Property Name Backward Compatible
mo_debugToAlert Music.debugToAlert no
mo_debugToJavaConsole Music.debugToJavaConsole no
mo_debugToStatus Music.debugToStatus no
mo_ignoreNotReady Music.ignoreNotReady no
mo_ignoreJavaDisabled Music.ignoreJavaDisabled no
mo_requiredMinVersion Music.requiredMinVersion no
mo_showCompatibilityPrompt Music.showCompatibilityPrompt no
mo_silentIfInadequate Music.silentIfInadequate no
mo_BeatnikType Music.playerType no
mo_BeatnikVersion Music.playerVersion no
mo_browserSupported Music.clientSupported no
mo_hasBeatnik Music.hasPlayer no
mo_platform Music.platform no
mo_enabled Music.enabled no

NOTE  The highlighted static property names indicate names that differ significantly from their original forms.
Becoming Player-neutral

In the two preceding sections on the new static methods and static properties, you will have noticed that some of the names for the new static versions of the global functions or properties were highlighted. In most cases, all global functions or properties can now be dereferenced from the "Music" object constructor, simply by replacing "mo_" in the name with "Music.". However, it was decided to use this opportunity to also change the names of some of the static methods and properties to make them less Beatnik-specific and more player-neutral.

This is all part of the effort towards gradually evolving the Music Object API into a module that can be standardized for the already established ECMA-262 scripting language standard (a.k.a. JavaScript, JScript, JellyScript). Hopefully in the future, Web browsers will have native support for scriptable interactive music and audio through the Music Object API module.